package c.e.a.b.f.b;

import c.e.a.b.e.c.h9;
import c.e.a.b.e.c.i1;
import c.e.a.b.e.c.m0;
import c.e.a.b.e.c.o0;
import java.math.BigDecimal;

/* compiled from: com.google.android.gms:play-services-measurement@@18.0.0 */
public final class ha extends ea {
    public o0 g;
    public final /* synthetic */ ba h;

    public ha(ba baVar, String str, int i, o0 o0Var) {
        this.h = baVar;
        super(str, i);
        this.g = o0Var;
    }

    public final int a() {
        return this.g.w();
    }

    public final boolean g() {
        return true;
    }

    public final boolean h() {
        return false;
    }

    public final boolean i(Long l, Long l2, i1 i1Var, boolean z) {
        Object obj = (h9.a() && this.h.a.g.u(this.a, p.a0)) ? 1 : null;
        boolean z2 = this.g.z();
        boolean A = this.g.A();
        boolean C = this.g.C();
        Object obj2 = (z2 || A || C) ? 1 : null;
        Boolean bool = null;
        if (z && obj2 == null) {
            Object valueOf;
            s3 s3Var = this.h.d().n;
            Integer valueOf2 = Integer.valueOf(this.b);
            if (this.g.v()) {
                valueOf = Integer.valueOf(this.g.w());
            }
            s3Var.c("Property filter already evaluated true and it is not associated with an enhanced audience. audience ID, filter ID", valueOf2, valueOf);
            return true;
        }
        m0 y = this.g.y();
        boolean A2 = y.A();
        if (i1Var.H()) {
            if (y.x()) {
                bool = ea.c(ea.b(i1Var.I(), y.y()), A2);
            } else {
                this.h.d().i.b("No number filter for long property. property", this.h.j().y(i1Var.D()));
            }
        } else if (i1Var.J()) {
            if (y.x()) {
                double K = i1Var.K();
                try {
                    bool = ea.f(new BigDecimal(K), y.y(), Math.ulp(K));
                } catch (NumberFormatException unused) {
                }
                bool = ea.c(bool, A2);
            } else {
                this.h.d().i.b("No number filter for double property. property", this.h.j().y(i1Var.D()));
            }
        } else if (!i1Var.F()) {
            this.h.d().i.b("User property has no value, property", this.h.j().y(i1Var.D()));
        } else if (y.v()) {
            bool = ea.c(ea.e(i1Var.G(), y.w(), this.h.d()), A2);
        } else if (!y.x()) {
            this.h.d().i.b("No string or number filter defined. property", this.h.j().y(i1Var.D()));
        } else if (q9.P(i1Var.G())) {
            bool = ea.c(ea.d(i1Var.G(), y.y()), A2);
        } else {
            this.h.d().i.c("Invalid user property value for Numeric number filter. property, value", this.h.j().y(i1Var.D()), i1Var.G());
        }
        this.h.d().n.b("Property filter result", bool == null ? "null" : bool);
        if (bool == null) {
            return false;
        }
        this.c = Boolean.TRUE;
        if (C && !bool.booleanValue()) {
            return true;
        }
        if (!z || this.g.z()) {
            this.d = bool;
        }
        if (bool.booleanValue() && obj2 != null && i1Var.y()) {
            long z3 = i1Var.z();
            if (l != null) {
                z3 = l.longValue();
            }
            if (!(obj == null || !this.g.z() || this.g.A() || l2 == null)) {
                z3 = l2.longValue();
            }
            if (this.g.A()) {
                this.f = Long.valueOf(z3);
            } else {
                this.e = Long.valueOf(z3);
            }
        }
        return true;
    }
}
